package cn.by.wms.service;

import cn.by.wms.dto.InventoryOptionDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.by.wms.entity.*;
import cn.by.wms.dao.InventoryDao;

import java.util.List;
import java.util.Map;

/**
 * 库存表;(206_inventory)表服务实现类
 * @author : heimi
 * @date : 2024-11-29
 */
@Service
public class InventoryService {
    @Autowired
    private Map<String, IInventoryOptionService> inventoryOptionServiceMap;

     
    @Autowired
    private InventoryDao inventoryDao;

    
    public Integer process(InventoryOptionDTO  dto) {
        String optionType = dto.getOptionType();
        IInventoryOptionService service = inventoryOptionServiceMap.get(optionType);
        service.process(dto);
        return  0;
    }

    public List<Inventory> select(InventoryQuery query) {
        return inventoryDao.select(query);
    }
    
//    public Integer update(Inventory inventory) {
//        return inventoryDao.update(inventory);
//    }
//
//    public Integer delete(Integer id) {
//        return inventoryDao.delete(id);
//    }
    
 
}